<%-- 
    Document   : deleteDB
    Created on : 04-Apr-2011, 17:32:05
    Author     : Thomas
--%>

<%@page contentType="text/html" pageEncoding="UTF-8"%>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
   "http://www.w3.org/TR/html4/loose.dtd">

<jsp:useBean id="addBookBean" class="beans_pkg.addBookBean" scope="page"/>
<jsp:setProperty name="addBookBean" property="*"/>

<%@ include file="header.jsp" %>

<!-- Content -->

<div id="container">
	<div id="content" role="main">
		<div id="post-0" class="post error404 not-found">
			<h1 class="entry-title">Database Deleted!</h1>
			<div class="entry-content">
                                <%
                                bookDatabase_pkg.bookDatabaseDriver driver = new bookDatabase_pkg.bookDatabaseDriver();

                                String category = addBookBean.getCategory();

                                int result = driver.databaseConnect(category);
                                if(result == 0){
                                    out.println("Database: " + category + " connected<br />");
                                }
                                else{
                                    out.println("ERROR: Database " + category + " cannot be found!<br />");
                                }

                                String result2 = driver.deleteDB(category);
                                out.println("Database: " + result2 + "<br />");
                                %>
				<br /><a href="http://localhost:8080/eBookCafe/adminPage.jsp">Return</a>
			</div><!-- .entry-content -->
		</div><!-- #post-0 -->
	</div><!-- #content -->
</div><!-- #container -->

<%@ include file="sidebar.jsp" %>

<!-- /Content -->

<%@ include file="footer.jsp" %>
